﻿#include <stdio.h>
int main()
{
	int m = 6;
	int n = 12;
	int r = 0;
	while (m % n)
	{
		r = m % n;
		m = n;
		n = r;
	}
	printf("%d\n", n);
	

	return 0;


}
